<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .adv{
            width: 300px;
            height: 300px;
            background-color: red;
            position: absolute;
            right: 0;
            bottom: 0;
        }
    </style>
</head>
<body>
    <div class="adv">
        <span class="close">X</span>
    </div>
    <script>
        // 点击x按钮的时候关闭 adv 元素 就可以了
        var closeEle = document.querySelector(".close");
        closeEle.onclick = function(){
            this.parentNode.style.display = "none";
            var _this = this;
            setTimeout(function(){
                // 点击之后 倒计时 3秒后 再显示广告
                _this.parentNode.style.display = "block";
            },3000);
        }


    </script>
</body>
</html>